﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class Animal
    {
        private int leg;

        public int Leg
        {
            get { return this.leg; }
            set { this.leg = value; }
        }

        public void eat()
        {
            Console.WriteLine("我能吃");
        }

        public void sleep()
        {
            Console.WriteLine("我能睡");
        }

        public virtual void cry()
        {
            Console.WriteLine("哦呼要叫了");
        }
    }
}
